﻿using UnityEngine;
using System.Collections;
using System.IO;

public class GameResources {
	
#if UNITY_EDITOR || UNITY_STANDALONE_WIN
	static string rootPath = Application.dataPath;
#elif UNITY_ANDROID
	static string rootPath = Application.streamingAssetsPath;
#endif
	
#if UNITY_EDITOR || UNITY_STANDALONE_WIN
	static string localPath = "file:///" + Directory.GetParent(Application.dataPath) + "/data/";
#elif UNITY_ANDROID
	static string localPath = Application.streamingAssetsPath;
#endif
	
	static string sceneMapName = "_MapInfo.xml";
	static string sceneMonsterName = "_MonsterInfo.xml";
	static string heroXmlName = "HeroInfo.xml";
	static string bulletXmlName = "BulletInfo.xml";
	static string heroUrl = "GameResources/UI/Dep/Sprite/Hero/";

	public static string RootPath
	{
		get{return rootPath;}
	}
	
	public static string LocalPath
	{
		get{return localPath;}
	}
	
	public static string SceneMapFileName
	{
		get{return sceneMapName;}
	}
	
	public static string SceneMonsterFileName
	{
		get{return sceneMonsterName;}
	}
	
	public static string HeroFileName
	{
		get{return heroXmlName;}
	}
	
	public static string BulletXmlName
	{
		get{return bulletXmlName;}
	}
	
	public static string HeroFileFolderName
	{
		get{return heroUrl;}
	}
	
	public static string GetMapFileName(string levelName)
	{
		return "Scene/Map/" + levelName + SceneMapFileName;
	}
	
	public static string GetMonsterFileName(string levelName)
	{
		return "Scene/Monster/" + levelName + SceneMonsterFileName;
	}
	
	public static string GetHeroFileName()
	{
		return "Scene/Hero/" + heroXmlName;
	}
	
	public static string GetBulletName()
	{
		return "Scene/Bullet/" + bulletXmlName;
	}
}
